package br.com.rpteixeira.dao;

import java.util.List;

import javax.persistence.PersistenceException;

import br.com.rpteixeira.entity.Entity;
import br.com.rpteixeira.entity.filter.EntitySearchFilter;
import br.com.rpteixeira.exceptions.ServiceExcetion;


public interface EntityDAO <ENTITY extends Entity,ENTITYSEARCHFILTER extends EntitySearchFilter> {
	public ENTITY insert(ENTITY entity) throws PersistenceException;
	public ENTITY update(ENTITY entity)  throws PersistenceException;
	public void delete (ENTITY entity)  throws PersistenceException;
	public List<ENTITY> find(ENTITYSEARCHFILTER entitySearchFilter) throws PersistenceException;
	public List<ENTITY> findAll()throws PersistenceException;
	public ENTITY findById(ENTITY entity) throws ServiceExcetion;
}
